
class Picvessel {
    var sizeBoolean, loader, listener, speed, _alpha, _width, _height, onEnterFrame;

    function Picvessel(_bool) {
        sizeBoolean = _bool;
        this.init();
    }

    function init() {
        loader = new MovieClipLoader();
        listener = new Object();
        var bool = sizeBoolean;
        listener.onLoadInit = function (target_mc) {
            if (bool) {
                target_mc._parent._parent.load_mc.removeMovieClip();
                target_mc._x = (980 - target_mc._width) / 2;
                target_mc._y = (714 - target_mc._height) / 2;
                if (!Main.filterBoolean){
                    
                }
                target_mc._alpha = 0;
                Main.bgMc._alpha = 100;
                target_mc.speed = 30;
                target_mc.onEnterFrame = function () {
                    if (speed > 8) {
                        speed = speed - 2.000000E-001;
                    }
                    _alpha = _alpha + 5;
                    Main.bgMc._alpha = Main.bgMc._alpha - 5;
                    var _loc3 = false;
                    var _loc2 = false;
                    if (Math.abs(Math.abs(Main.bgMc._width) - Math.abs(_width)) > 15 && !_loc3) {
                        Main.bgMc._width = Main.bgMc._width + speed * ((_width - Main.bgMc._width) / Math.abs(_width - Main.bgMc._width));
                    }else {
                        _loc3 = true;
                        Main.bgMc._width = _width;
                    }
                    if (Math.abs(Math.abs(Main.bgMc._height) - Math.abs(_height)) > 15 && !_loc2) {
                        Main.bgMc._height = Main.bgMc._height + speed * ((_height - Main.bgMc._height) / Math.abs(_height - Main.bgMc._height));
                    }else {
                        _loc2 = true;
                        Main.bgMc._height = _height;
                    }
                    if (_loc3 && _loc2 && _alpha >= 99) {
                        _alpha = 100;
                        Main.bgMc._alpha = 0;
                        delete this.onEnterFrame;
                    }
                };
                Main.filterBoolean = false;
            }else {
                target_mc._parent.load_mc.removeMovieClip();
                target_mc._xscale = target_mc._yscale = 64 / target_mc._height * 100;
                target_mc._x = (94 - target_mc._width) / 2;
            }
        };
        loader.addListener(listener);
    }

    function load(url, mc) {
        loader.loadClip(url, mc);
    }
}
